package com.dotflat.shop.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;

import java.beans.ConstructorProperties;

@AllArgsConstructor(access = AccessLevel.PRIVATE)
@NoArgsConstructor
@Getter
@Data
public class ShopResponse {

//    "msg" -> "成功"
//            "code" -> {Integer@15639} 20000
//            "data" -> {
//        ArrayList @15641}  size = 7
//            "success" -> {Boolean@15643} true

    @ConstructorProperties({"code", "msg", "data"})
    private ShopResponse(Integer code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    @JsonProperty("code")
    @NonNull
    private Integer code;

    @JsonProperty("msg")
    private String msg;

    @JsonProperty("data")
    private Object data;

    private Boolean success;

}

